public class DaoTest {
    public static void main(String[] args) {
        DAO dao = new DAO();
        User u1 = new User(1, "jack", 18);
        User u2 = new User(2, "rose", 23);
        User u3 = new User(3, "tom", 7);
        User u4 = new User(4, "jerry", 55);
        User u5 = new User(5, "mike", 36);

        dao.save("10001", u1);
        dao.save("10002", u2);
        dao.save("10003", u3);
        dao.save("10004", u4);
        dao.save("10005", u5);
        System.out.println(dao.list());
        System.out.println("-----------------------------------");
        dao.update("10002", new User(6, "test", 99));
        System.out.println(dao.list());
        System.out.println("-----------------------------------");
        dao.delete("10003");
        System.out.println(dao.list());
        System.out.println("-----------------------------------");
        dao.update("10008", u2);
        dao.delete("10009");

    }
}
